#ifdef RT_USE_OLD_CONN_WRAP

#ifndef RTSESSIONINTERFACE_H
#define RTSESSIONINTERFACE_H

#include "RtReferenceControl.h"

class IRtTransport;
class CRtMessageBlock;
class CRtTransportParameter;
class IRtSessionOneForwardMany;

class RT_API_EXPORT CRtSessionManager
{
public:
	static CRtSessionManager* Instance();

	/// Create <IRtSessionOneForwardMany>.
	RtResult CreateSessionForward(IRtSessionOneForwardMany *&aForward);

	~CRtSessionManager();

private:
	CRtSessionManager();

	static CRtSessionManager s_rtSessionManagerSingleton;
};

class /*RT_API_EXPORT*/ IRtSessionOneForwardMany : public IRtReferenceControl
{
public:
	virtual RtResult AddTransport(IRtTransport *aTrpt) = 0;

	virtual RtResult RemoveTransport(IRtTransport *aTrpt) = 0;

	virtual RtResult RemoveAllTransports() = 0;

	// send <aData> to all added tranports except <aSender>.
	virtual RtResult SendDataToAll(
		CRtMessageBlock &aData, 
		CRtTransportParameter *aPara = NULL,
		IRtTransport *aSender = NULL) = 0;

protected:
	virtual ~IRtSessionOneForwardMany() { }
};

#endif // !RTSESSIONINTERFACE_H

#endif // RT_USE_OLD_CONN_WRAP
